package testClass;

public class Test1 {
    public static void main(String[] args) {
        Student student=new Student();
        System.out.println(student);

        Class<Student> class1 = Student.class;
        System.out.println(class1);

        Class<? extends Student> class2 = student.getClass();
        System.out.println(class2);

        //第三种写法：最常用的写法;  forName方法的参数为类的完整路径= 包名.类名
        try {
            Class<?> class3 = Class.forName("testClass.Student");
            System.out.println(class3);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
    }
}
